<template>
    <div>
      <input type="text"  v-model="INPUT">
      <button @click="addClick" :disabled="!INPUT" >添加</button>
      <TTTTable v-for="(item,index) in ValueArr" :key="index" :VALUE="item" @delClick="delClick(index)" />
    </div>
    
    
  </template>
  
  <script setup>
  import TTTTable from './components/ttttable.vue'
    import { ref } from 'vue';
  
  const INPUT=ref(null)
  const ValueArr=ref([])
  
  const addClick=()=>{
    if(INPUT.value&&INPUT.value!==''){
      ValueArr.value.push(INPUT.value)
      INPUT.value=null
    }
  }

  const delClick=(index)=>{
      ValueArr.value.splice(index,1)
  }
  
    
  </script>
  
  <style>
  
  </style>